package pit.com.ordermobilesystem;

import pit.com.ordermobilesystem.a.OrderActivity;
import pit.com.ordermobilesystem.a.PizzaHutActivity;
import pit.com.ordermobilesystem.a.UpdateActivity;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class TabPizzaActivity extends TabActivity {
	 @Override
	    public void onCreate(Bundle savedInstanceState){
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.table_main);
	        //new tabhost 
	        TabHost tabHost = getTabHost();

			// Tab for Home
			TabSpec PizzaHutspec = tabHost.newTabSpec("Home");
			PizzaHutspec.setIndicator("",
					getResources().getDrawable(R.drawable.icon_home));
			Intent PizzaHutIntent = new Intent(this, PizzaHutActivity.class);
			PizzaHutspec.setContent(PizzaHutIntent);

			// Tab for Menu
			TabSpec TellTitlesspec = tabHost.newTabSpec("Menu");
			// setting Title and Icon for the Tab
			TellTitlesspec.setIndicator("",
					getResources().getDrawable(R.drawable.icon_menu));
			Intent listIntent = new Intent(this, TellTitlesFragment.class);
			TellTitlesspec.setContent(listIntent);

			// Tab for Payment
			TabSpec Orderspec = tabHost.newTabSpec("Payment");
			Orderspec.setIndicator("",
					getResources().getDrawable(R.drawable.icon_payment));
			Intent OrderIntent = new Intent(this, OrderActivity.class);
			Orderspec.setContent(OrderIntent);

			// Tab for Payment
					TabSpec Updatespec = tabHost.newTabSpec("Update");
					Updatespec.setIndicator("",
							getResources().getDrawable(R.drawable.icon_update));
					Intent UpdateIntent = new Intent(this, UpdateActivity.class);
					Updatespec.setContent(UpdateIntent);
			// Adding all TabSpec to TabHost
			tabHost.addTab(PizzaHutspec); // Adding Home tab
			tabHost.addTab(TellTitlesspec); // Adding Menu tab
			tabHost.addTab(Orderspec); // Adding Payment tab    
			tabHost.addTab(Updatespec); // Adding Update tab 
	    }
}
